<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<style type="text/css">

	table#memberListTable{width:800px; color:#5D5D5D; font-size:12px; text-align:center; border-top:1px solid #575757;border-bottom:1px solid #575757}
	table#memberListTable a{text-decoration:none; color:#CDA9A9;}
	table#memberListTable a:hover{text-decoration:underline; color:#892525;}
	table#memberListTable th{background:#FFFF24; padding:8px 0; border-bottom:1px solid #7B7B7B}
	table#memberListTable td{padding:10px 0 10px 0; background:#FFFFF6;border-bottom:1px dashed #EAEAEA}
	table#memberListTable tr.gry td{background:#FFFFC6;}
	table#memberListTable tr.last td{border-bottom:0px;}
</style>  



<script type="text/javascript">
	function tdBgChanger(){
		var trs = document.getElementById('memberListTable').getElementsByTagName('tr');
		var finalNum = Number(trs.length - 1);
		for(var j=0;j<trs.length;j++){
			
			if(j%2 == 0){
				trs[j].className = 'gry';
				if(j == finalNum){
					trs[j].className = 'gry last';
				}
			}else{
				if(j == finalNum){
					trs[j].className = 'last';
				}
			}
		}
	}
</script>  
    
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
	$(function(){
		$("#findBtn").click(function(){
			var member=$("#memberId").val();
			location.href="admin.do?command=findMemberById&id="+member;
			
		});
	});
</script>

<img src="${initParam.root}/img/member_list_top.gif"><br><br>


<table cellpadding="0" cellspacing="0" id="memberListTable" align="center">

<thead>
<tr>
<th>아이디</th><th>패스워드</th><th>성별</th>
</tr>
</thead>
<tbody>
<c:forEach items="${requestScope.lvo.list}" var="i">
<tr>
<td><a href="admin.do?command=findMemberById&id=${i.id}">${i.id}</a></td><td>${i.password}</td><td>${i.gender}</td>
</tr>
</c:forEach>
</tbody>
</table><br>

<script type="text/javascript" >tdBgChanger()</script>


<form align="center">
	<c:if test="${requestScope.lvo.pagingBean.previousPageGroup}">
	<a href="${initParam.root}/admin.do?command=allMember&pageNo=${requestScope.lvo.pagingBean.startPageOfPageGroup-1}">
	<img src="${initParam.root}/img/left_arrow_btn.gif"></a>
	</c:if>
	
	<c:forEach var="i" begin="${requestScope.lvo.pagingBean.startPageOfPageGroup}" end="${requestScope.lvo.pagingBean.endPageOfPageGroup}">
	<c:choose>
	<c:when test="${requestScope.lvo.pagingBean.nowPage!=i}">
	<a href="${initParam.root}/admin.do?command=allMember&pageNo=${i}">${i}</a>
	</c:when>
	<c:otherwise>
	${i}
	</c:otherwise>
	</c:choose>
	</c:forEach>	 
	 
	<c:if test="${requestScope.lvo.pagingBean.nextPageGroup}">
	<a href="${initParam.root}/admin.do?command=allMember&pageNo=${requestScope.lvo.pagingBean.endPageOfPageGroup+1}">
	<img src="${initParam.root}/img/right_arrow_btn.gif"></a>
	</c:if>
	<br><br>
</form>
	<form align="right"><font size="2px" color="#5D5D5D"><b>회원직접검색 :</b></font><input type="text" name="memberId" id="memberId"><input type="button" value="상세정보보기" id="findBtn"></form>